/*
 * rtOpts.h
 *
 *  Created on: May 20, 2011
 *      Author: ulas
 */

#ifndef RTOPTS_H_
#define RTOPTS_H_

#include <mqueue.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include "common/Queue.h"
#include "common/sys.h"
#include "common/Common_Types.h"
#include "common/CL_Common.h"

typedef enum
{
	MQUEUE_CL2AP_ind =0,
	MQUEUE_CL2IL_ind,
	MQUEUE_AP2CL_ind,
	MQUEUE_IL2CLREQ_ind,
	MQUEUE_IL2CLRT_ind,
    MQUEUE_COUNT
} MQUEUE_IND_ENUM;

typedef struct
{
	U8 msg[MAX_MESSAGE_SIZE];
	U16 msgLength;
}CL2IL_MESSAGE_TYPE;


class rtOpts {

private:
	char mqIdList[5][20];
	QUEUE_TYPE* rxQueue;
public:
	rtOpts();
	SLOT_TYPE RTCL;
	myCL_TYPE myCL;
	BOOL reqCL;
	CL2IL_MESSAGE_TYPE Tx[TOTAL_NUMBER_OF_CHANNELS + 1]; /*As the 0th channel will NOT be used*/
	mqd_t mqList[MQUEUE_COUNT];

	STATUS insertIntoRxQueue(U8* msg);
	U8* removeFromRxQueue();
	STATUS insertIntoTx(void* CLParPtr, U8* payload, U16 payloadLength, U8 ch);
	CL2IL_MESSAGE_TYPE* removeFromTx(U8 ch);
	virtual ~rtOpts();

};

#endif /* RTOPTS_H_ */
